<%inherit file="base.mako"/>
<%def name="title()">
    Manage Users
</%def>
<%def name="js()">
    ${h.javascript_link("/user/manage.jquery.js")}
</%def>
<span class="form">
    ${h.secure_form(url('create_user'),id='form')}
        % if c.SuperUser:
            New name , please :  ${h.text(name='username',id='username',value=c.username)}<br>
            % if c.Admin:
                <span class="secrect">Note : Change the username to one which is alread exsited will hide it :)</span>
                <span class="secrect">Note : A more beautiful but not safe way is to set it secrect here </span>
            % endif
        %endif
        New password (if you want to change) : ${h.password(name='password',id='password')}
        <span class="hide"> 
            <span class="error">
                <div id="pwddifferent">Two password is not the same</div>
            </span>
        </span><br>
        Password again , please : ${h.password(name='password1',id='password1')}<br>
        Email : ${h.text(name='email',id='email',value=c.email)} <div id='emailerr'></div>
        <span class="hide"> 
            <span class="error">
                <div id="emailempty">Email cannot be empty</div>
                <div id="emailinvalid">Email format is not valid</div>
            </span>
        </span><br>
        Your signature : ${h.textarea(name='sign',id='sign',value=c.sign)}<br>
        Your description : ${h.textarea(name='description',id='description',value=c.description)}<br>

        %if c.SuperUser:
            <span class="secrect">
                Maybe you would like to change the right of the user?
                So give me the right id or the name of the right:
                ${h.text(name='right',id='right')} ${h.link_to('Do not know',h.url('list_right'))} \
                or want a ${h.link_to('new',h.url('make_right')} one? Click a few words left :P
            </span>
        % endif
        ${h.submit(name='submit',id='submit',value='Change It!')}
    ${h.end_form()}
</span>

